package com.example.sysao.service.impl;

import com.example.sysao.mapper.SutdentMapper;
import com.example.sysao.pejo.Student;
import com.example.sysao.service.StudentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class StudentServiceImp implements StudentService {
    @Resource
    private SutdentMapper sutdentMapper;

    @Override
    public Student findById(int id) {
        return sutdentMapper.selectById(id);
    }

    @Override
    public boolean saveStudent(Student student) {
        return sutdentMapper.updateStudent(student) != 0;
    }

    @Override
    public boolean addStudent(Student student) {
        return sutdentMapper.insertStudent(student) != 0;
    }


    //登录

}
